﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class DangKy : System.Web.UI.Page
{
    khachhang kh = new khachhang();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack == false)
        {
            MultiView1.SetActiveView(View1);
        }
    }
    protected void btndangky_Click(object sender, EventArgs e)
    {
        kh.Insert_Taikhoan(txttendn.Text,txthoten.Text,txtmk1.Text,txtdiachi.Text,txtdt.Text,"CN01",txtemail1.Text);
        MultiView1.SetActiveView(View2);
        string ten=kh.dangnhap(txttendn.Text, txtmk1.Text);
        Session["kh"] = ten;
        lblten.Text = ten;
    }
    protected void btnhuy_Click(object sender, EventArgs e)
    {
        Response.Redirect("TrangChu.aspx");
    }
}